{% load i18n %}
{% load prices_i18n %}
{% load staticfiles %}

{% if has_products %}
  <div class="modal-content">
    <div class="row">
      <div class="col s12">
        <h5>
          {% trans "Error" context "Dashboard error" %}
        </h5>
      </div>
    </div>
    <div class="row">
      <div class="col s12 center-align">
        <p>
          {% blocktrans trimmed context "Modal delete product class with products text" %}
            This type is base for created products. Cannot remove it.
          {% endblocktrans %}
        </p>
      </div>
    </div>
  </div>
  <div class="modal-footer">
    <a href="#!" class="modal-action modal-close btn-flat">
      {% trans "Cancel" context "Dashboard cancel action" %}
    </a>
  </div>
{% else %}
  <form action="{% url "dashboard:product-class-delete" pk=product_class.pk %}" method="post" novalidate>
    {% csrf_token %}
    <div class="modal-content">
      <div class="row">
        <div class="col s12">
          <h5>
            {% trans "Are you sure?" context "Dashboard confirmation modal" %}
          </h5>
        </div>
      </div>
      <p>
        {% blocktrans trimmed context "Modal delete product class text" %}
          If you remove <strong>{{ product_class }}</strong> you will lose all data related to this product type.
        {% endblocktrans %}
      </p>
    </div>
    <div class="modal-footer">
      <button type="submit" class="modal-action btn-flat">
        {% trans "Delete" context "Dashboard delete action" %}
      </button>
      <a href="#!" class="modal-action modal-close btn-flat">
        {% trans "Cancel" context "Dashboard cancel action" %}
      </a>
    </div>
  </form>
{% endif %}
